home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
ov_all.zip
/
TI633.ASC
< prev
next >
Wrap
Text File
|
1991-09-11
|
5KB
|
199 lines
PRODUCT : ObjectVision NUMBER : 633
VERSION : 1.0
OS : WIN
DATE : September 11, 1991 PAGE : 1/3
TITLE : Simulating a Paradox one to many relationship in
ObjectVision.
Description: Linking Master and Detail tables is possible in
ObjectVision but not the capability to display more than one
detail record at a time. Since there is also no mechanism to
control the scrolling of the detail records so that you remain
"locked" on the Master, you need to be aware that as you press
Next or Previous you can also change the Master as well as the
Detail records that you are viewing.
This is a description of how to simulate a one to many
relationship in ObjectVision. MASTER buttons control scrolling
records in a Master database. DETAIL buttons control scrolling
records in a detail database. The two tables remain in sync
unless one of the Master records is deleted, creating "orphans".
This technical note assumes you have the following Paradox table
structures:
MASTER.DB
LAST A20*
FIRST A20
ADDRESS A20
DETAIL.DB
LAST A20*
ORDER NO. N*
ORDER DESC. A20
(Asterisk means the field is keyed in Paradox.)
How it works:
In ObjectVision create five data fields on a form: Last name,
Master first, Master address, Detail order no, and Detail
description.
Create two Paradox links, Master link and Detail link. One will
link with the Master table and the other will link with the
Detail table. Use Tools|Links to create the Paradox table links.
The links should be setup as follows:
PRODUCT : ObjectVision NUMBER : 633
VERSION : 1.0
OS : WIN
DATE : September 11, 1991 PAGE : 2/3
TITLE : Simulating a Paradox one to many relationship in
ObjectVision.
ObjectVision field Master table/ Detail table/
Master link Detail
link
---------------------------------------------------------------------
Last name Last Last
Master first First
Master last Last
Detail order no. Order no.
Detail description Order
Desc.
Allow ObjectVision to create the default buttons when you create
the first link. You may want to create 2 additional buttons so
that can get you to the first and last records in the database,
if so call them first and last and attach the appropriate
conclusion, @top("Master Link") and @bottom("Master Link"). So
that you cannot "orphan" any detail records you might also wish
to remove the Delete button for this master link. Next modify
the names of these buttons using Properties|Field/Name to Master
Enter, Master Next, Master Previous and so on.
When you create the second link allow ObjectVision to create the
default buttons automatically which it can now do if you have
renamed the original set of default buttons as described in the
previous paragraph. If you have not modified the original
buttons, ObjectVision will ask you if you wish to create them for
this second (and subsequent links) but will be unable to do so
because the names will need to be unique and have already been
used.
PRODUCT : ObjectVision NUMBER : 633
VERSION : 1.0
OS : WIN
DATE : September 11, 1991 PAGE : 3/3
TITLE : Simulating a Paradox one to many relationship in
ObjectVision.
Pressing the buttons associated with the Master link scroll
through the Master table, showing the different names of people
in the tables. Pressing the buttons associated with the Detail
link scroll through the order details of the tables. As you
scroll through the detail records you will find that it is
possible to go to the next (or previous) master record so you
will have to watch out for this.
This form is not designed to append records, or edit keyed
fields. Some simple modification can make this possible.